Skip to content

Switch to postgres 16 as a minimum requirement#5031

Open
ShimShtein wants to merge 1 commit into
theforeman:masterfrom
ShimShtein:switch_pg13_to_pg16
Open

Switch to postgres 16 as a minimum requirement#5031
ShimShtein wants to merge 1 commit into
theforeman:masterfrom
ShimShtein:switch_pg13_to_pg16

Conversation

@ShimShtein

Copy link
Copy Markdown
Member

What changes are you introducing?

Update the minimum version of PostgreSQL db to 16

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

We are switching from PostgreSQL 13 to 16.

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

Contributor checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.19/Katello 4.21
  • Foreman 3.18/Katello 4.20 (Satellite 6.19)
  • Foreman 3.17/Katello 4.19
  • Foreman 3.16/Katello 4.18 (Satellite 6.18; orcharhino 7.6, 7.7, and 7.8)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4; orcharhino 7.5)
  • We do not accept PRs for Foreman older than 3.14.

@github-actions github-actions Bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

The PR preview for f976289 is available at theforeman-foreman-documentation-preview-pr-5031.surge.sh

No diff compared to the current base

show diff

@jafiala jafiala self-requested a review July 9, 2026 08:05
@jafiala jafiala removed the Needs testing Requires functional testing label Jul 9, 2026
@maximiliankolb

Copy link
Copy Markdown
Contributor

I am unsure about this change as is. I checked the currently available versions on the Foreman platform OS:

$ podman run --rm -it docker.io/library/ubuntu:jammy /bin/bash -c "apt-get update && apt-cache show postgresql" | rg "^Package:|^Version:"
Package: postgresql
Version: 14+238
$ podman run --rm -it docker.io/library/debian:bookworm /bin/bash -c "apt-get update && apt-cache show postgresql" | rg "^Package:|^Version:"
Package: postgresql
Version: 15+248+deb12u1
$ podman run --rm -it quay.io/almalinuxorg/almalinux:9.8 dnf info postgresql | rg "^Name|^Version|^Source"
Name         : postgresql
Version      : 13.23
Source       : postgresql-13.23-3.el9_8.src.rpm

This makes me believe that we cannot say both "please use PG 16" and "use the latest PG version shipped by your OS vendor".

Is there a ticket or any PR in foreman/katello/pulp to track this?

@maximiliankolb

Copy link
Copy Markdown
Contributor

Aha:

$ podman run --rm -it quay.io/almalinuxorg/almalinux:10.2 dnf info postgresql | rg "^Name|^Version|^Source"
Name         : postgresql
Version      : 16.14
Source       : postgresql16-16.14-1.el10_2.src.rpm

Is this related to Foreman/Foreman+Katello on EL10?

@ShimShtein

Copy link
Copy Markdown
Member Author

You are correct, I was just looking into it.
I wonder if we should switch to recommending a containerized deployment for custom DB support too. This will definitely simplify our guidelines and make it OS-agnostic.

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lean to only state we require PostgreSQL 16 for the containerized installation and not touch the existing RPM/deb-based installations. We don't even test PostgreSQL 16 with those.

@pr-processor pr-processor Bot added Waiting on contributor Requires an action from the author and removed Not yet reviewed labels Jul 9, 2026
@ShimShtein

Copy link
Copy Markdown
Member Author

I lean to only state we require PostgreSQL 16 for the containerized installation and not touch the existing RPM/deb-based installations. We don't even test PostgreSQL 16 with those.

Let me reiterate the possibilities here, so we can all decide how to continue with this:
Given:
RHEL < 10 and debian < 13 have lower versions of PG available
Suggested solutions:

  1. stop recommending the PG version from the OS and point to postgres repos
  2. set a minimum OS version for the postgres server
  3. containerized PG (with the caveat that it is not intuitive for the users)
  4. Remove specific instructions on how to obtain PG 16 from https://github.com/theforeman/foreman-documentation/blob/master/guides/common/modules/proc_installing-postgresql-as-an-external-database.adoc?plain=1 and only define the requirements and configuration.

@ekohl

ekohl commented Jul 9, 2026

Copy link
Copy Markdown
Member

Let's look at the various builds we produce and what I'd recommend:

  • foreman-deb: keep it as-is
  • foreman-el: keep it as-is
  • katello: keep it as-is
  • orcharhino: keep it as-is (looking at @maximiliankolb for that)
  • containerized: set the supported version to 16. Recommend an EL 10 installation for the external DB and use RPM packages.

@evgeni

evgeni commented Jul 9, 2026

Copy link
Copy Markdown
Member

I completely agree with what @ekohl said above.

@ShimShtein

Copy link
Copy Markdown
Member Author

OK, so I'll put the PG 16 requirement only for the containerized deployment and add an EL10 + RPM recommendation to the external DB procedure.

@ShimShtein ShimShtein force-pushed the switch_pg13_to_pg16 branch from 046ea8b to f976289 Compare July 9, 2026 15:17
@pr-processor pr-processor Bot added Needs re-review and removed Waiting on contributor Requires an action from the author labels Jul 9, 2026
@ShimShtein

Copy link
Copy Markdown
Member Author

What do you think about this version?
I have added a special case for containerized deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs re-review Needs style review Requires a review from docs style/grammar perspective Needs tech review Requires a review from the technical perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants